package main

import (
	"fmt"
	"runtime"
)

func main() {
	cpuNum := runtime.NumCPU()
	fmt.Println(cpuNum)
	// 设置使用多少cpu
	runtime.GOMAXPROCS(cpuNum - 1)
}
